<?php
defined('BME_INSERTION') or die('Error code: '.BME_INVALID_INSERT_ERROR);

$mod = $_REQUEST[$_REQUEST["module"]];
$query=$header=$footer="";
if (ereg("^(.*):(.*)$",$mod,$reg)) {
	$mod = $reg[1];
	$query = $reg[2];
}
$mods = array("index","create","search");

if(!in_array($mod,$mods)) $mod="index";

include(BME_ROOT."gui/mod/{$_REQUEST["module"]}.$mod.php");

if(empty($_POST['query'])){
	echo "
	$header
	<form action='".BME_SITE."resolver.php' method='post' enctype='multipart/form-data'>
		<input type='hidden' name='query' value='$mod/$query'/>
		<dl>$form</dl>
		<dl style='text-align:center;'><input type='submit'></dl>
	</form>
	$footer";
}


?>
